package com.ruoyi.base.service.impl;

import com.ruoyi.base.domain.Build;
import com.ruoyi.base.mapper.FloorBuildMapper;
import com.ruoyi.base.service.IFloorBuildService;
import com.ruoyi.common.utils.uuid.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 楼座档案Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-03
 */
@Service
public class FloorBuildServiceImpl implements IFloorBuildService {
    @Autowired
    private FloorBuildMapper floorBuildMapper;

    /**
     * 查询楼座档案
     *
     * @param id 楼座档案主键
     * @return 楼座档案
     */
    @Override
    public Build selectFloorBuildById(String id) {
        return floorBuildMapper.selectFloorBuildById(id);
    }

    /**
     * 查询楼座档案列表
     *
     * @param build 楼座档案
     * @return 楼座档案
     */
    @Override
    public List<Build> selectFloorBuildList(Build build) {
        return floorBuildMapper.selectFloorBuildList(build);
    }

    /**
     * 新增楼座档案
     *
     * @param build 楼座档案
     * @return 结果
     */
    @Override
    public int insertFloorBuild(Build build) {
        build.setId(UUID.randomUUID().toString());
        return floorBuildMapper.insertFloorBuild(build);
    }

    /**
     * 修改楼座档案
     *
     * @param build 楼座档案
     * @return 结果
     */
    @Override
    public int updateFloorBuild(Build build) {
        return floorBuildMapper.updateFloorBuild(build);
    }

    /**
     * 批量删除楼座档案
     *
     * @param ids 需要删除的楼座档案主键
     * @return 结果
     */
    @Override
    public int deleteFloorBuildByIds(String[] ids) {
        return floorBuildMapper.deleteFloorBuildByIds(ids);
    }

    /**
     * 删除楼座档案信息
     *
     * @param id 楼座档案主键
     * @return 结果
     */
    @Override
    public int deleteFloorBuildById(String id) {
        return floorBuildMapper.deleteFloorBuildById(id);
    }
}
